/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package Classes;
import java.awt.*;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import javax.swing.*;

/**
 *  Formulaire principal
 * @author ZwoRmi
 */
public class CreationMarque implements ActionListener {
    private JButton boutonPrincipal;
    private JFrame _frame;
    public CreationMarque(){
        this.init();
    }

    private void init() {
        _frame = new JFrame();
        initFrame();
        
    }

    private JPanel creerPanelNord() {
        JPanel panel = new JPanel();
        panel.setBackground(Color.white);
        panel.setLayout(new BoxLayout(panel, 1));
        JLabel image = new JLabel(new ImageIcon("C:\\Users\\userinsta\\Documents\\NetBeansProjects\\trunk\\ProjetLucasDany\\images\\LogoLittle.png"));
        panel.add(image);
        return panel;
    }
    private JPanel creerPanelCentre() {
        JPanel panel = new JPanel();
        panel.setBackground(Color.white);
        boutonPrincipal = new JButton("Gérer votre ERP");
        boutonPrincipal.addActionListener(this);
        panel.add(boutonPrincipal);
        return panel;
    }
    private JPanel creerPanelSud(){
        JPanel panel = new JPanel();
        panel.setBackground(Color.white);
        JLabel label = new JLabel("Dany Patient - Lucas Lemaire © 2014");
        panel.add(label);
        return panel;
    }

    private void initFrame() {
        _frame.setVisible(true);
        _frame.setBackground(Color.white);
        _frame.setResizable(true);
        _frame.setSize(500, 200);
        _frame.setLocationRelativeTo(null);
        _frame.setTitle("ZwoD, votre ERP Restaurant");
        _frame.setLayout(new BorderLayout());
        _frame.add(creerPanelNord(), "North");
        _frame.add(creerPanelCentre(), "Center");
        _frame.add(creerPanelSud(), "South");
        _frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
    }

    @Override
    public void actionPerformed(ActionEvent ae) {
        new RenseignementMarqueRestaurant();
        _frame.dispose();
    }
    
}
